/**
* @file TimeModule.h
* @author
* @brief 时间及频率发布模块
* @version 1.0
* @date 2020-07-23
*
* @copyright Copyright (c) 2020
*
*/

#pragma once

#include "data_struct/base/TimeWorkBase/ModuleBase.h"
#include "data_struct/base/TimeWorkBase/time/SteadyClock.hpp"
#include "data_struct/base/TimeWorkBase/time/Frequency.hpp"

namespace behavior_controller {
class TimeModule : public ModuleCloner<TimeModule> {
public:
    /**
     * @brief 时间频率发布定义
     *
     */
    void InstallFunctors();

    /**
     * @brief 100hz频率发布回调定义
     *
     */
    void Timer100HzCallBack();

    /**
     * @brief 2hz频率发布回调定义
     *
     */
    void Timer2HzCallBack();

    /**
     * @brief 时间频率发布关闭
     *
     */
    void PrepareRemove() override;

private:
    std::shared_ptr<Frequency<time::SteadyClock>> ptr_100hz; //100hz频率发布类型对象指针
    std::shared_ptr<Frequency<time::SteadyClock>> ptr_2hz;   //2hz频率发布类型对象指针
};
} // namespace behavior_controller